#define _CRT_SECURE_NO_WARNINGS

#include "pro.h"

int main()
{
	char end;
	LinkList H = NULL;
	InitList(H);
	
	do 
	{
		scanf("%c", &end);
		CreatElem(H, end);
	} while (end - '$');
	printf("%c", H->next->a);
	return 0;
}